package com.pshcp.common.enums;

/**
 * @Description: 专家类型  0否 1专家
 * @Author: xiaoche
 * @Date: 2022/10/29 12:36
 */
public enum ExpertTypeEnum {

    NO(0, "普通"),

    YES(1, "专家"),

    ;

    private Integer code;
    private String desc;

    ExpertTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDescByCode(int code){
        for(ExpertTypeEnum e : ExpertTypeEnum.values()){
            if(e.getCode().intValue() == code){
                return e.getDesc();
            }
        }
        return null;
    }

}
